package util.cvs.convert;

import com.opencsv.bean.AbstractBeanField;
import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;

/**
 * Integer 转化类
 * Create on 2019-07-26 22:45
 *
 * @author tianbl
 */
@Slf4j
public class IntegerPropertyConverter extends AbstractBeanField {

    @Override
    protected Integer convert(String value) {
        BigDecimal amountYuan = new BigDecimal(value.trim());
        return amountYuan.multiply(new BigDecimal("100")).intValue();
    }
}
